import tempfile

tempfile.tempdir = '/Users/pitaloveu'
_, file = tempfile.mkstemp( suffix = 'fuck' , prefix = 'shit' )

with open( file , 'w' ) as fo:
    with open( 'c++test.cpp' , 'r' ) as fi:
        lines = fi.readlines()
        fo.writelines( lines )
